﻿using System;
using Orchard.ContentManagement.Records;
using Orchard.Environment.Extensions;

namespace FruitCake.ContactPage.Models
{
    [Flags()]
    public enum FieldFlags
    {
        None = 0, 
        NameField = 1,
        ReasonField = 2,        
        SubjectField = 4        
    }

    [OrchardFeature("FruitCake.ContactPage")]
    public class ContactPagePartRecord : ContentPartRecord
    {   
        public ContactPagePartRecord()
        {
            Fields = FieldFlags.None;
            TextMaxLength = 1000;
        }

        public virtual FieldFlags Fields { get; set; }
        public virtual string NameCaption { get; set; }
        public virtual string MailCaption { get; set; }
        public virtual string ReasonCaption { get; set; }
        public virtual string ReasonsList { get; set; }
        public virtual string SubjectCaption { get; set; }
        public virtual bool SubjectIsRequired { get; set; }
                        
        public virtual string TextCaption { get; set; }
        public virtual int TextMaxLength { get; set; }

        public virtual string TextClass { get; set; }
        public virtual int TextRows { get; set; }
        public virtual int TextCols { get; set; }
        public virtual string InputClass { get; set; }
        public virtual int InputSize { get; set; }

        public virtual bool MailEnabled { get; set; }
        public virtual string ToList { get; set; }
        public virtual string CcList { get; set; }
        public virtual string BccList { get; set; }
        public virtual string SubjectTemplate { get; set; }
        public virtual string BodyTemplate { get; set; }

        public virtual string RedirectTo { get; set; }                
        public virtual string SentMessage { get; set; }        
    }
}